const { con, Result } = require('./common');

let getAnimationList = async (page) => {
    let res = new Result();
    let start = (page-1)*20;
    let end = page*20;
    let [rows] = await con.query("select * from animation where numhas != 0 limit "+start+","+end);
    if(rows.length === 0){
        res.code = 40105;
        res.msg = 'animation is null';
    }else{
        res.data = rows;
    }
    return res;
}

module.exports = { getAnimationList };
